package maxProductDifference;

import java.util.Arrays;

public class Solution {
    public int maxProductDifference(int[] nums) {
        // 两个大的和连个小的
        Arrays.sort(nums);
        return nums[nums.length-1]*nums[nums.length-2] - nums[0]*nums[1];
    }
}
